<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="author" content="mobileApps"/>
<title>FastLink</title>
<script type="text/javascript">
	if ( (navigator.userAgent.indexOf('iPad') != -1)) {
		document.location = "indexipad.html";
	}
</script>
</script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
    <script type="text/javascript" charset="utf-8">

    // Wait for PhoneGap to load
    //
    function onLoad() {
        document.addEventListener("deviceready", onDeviceReady, false);
    }

    // PhoneGap is ready
    //
    function onDeviceReady() {
        // Empty
    }

    // alert dialog dismissed
    function alertDismissed() {
        // do something
    }

    // Show a custom alert
    //
    function showAlert() {
        navigator.notification.alert(
            'mobileApps is a program managed by two students at Western State College of Colorado. Thanks to HostGator.com for providing server space to the program.',  // message
            alertDismissed,         // callback
            'About',            // title
            'Dismiss'                  // buttonName
        );
    }

    </script>
	
	
	
<script type="text/javascript">
	$(function(){
var ajax_loader = '<img src="img/loading.gif" alt="" />';
$('.response').hide();
$('.loader').hide();
$('#submit_short').click(function(){
		//Show AJAX loader 
		$('.loader:eq(0)').html(ajax_loader).show(500, function(){
			//Perform request
			$.post('http://mobileap.ps/apps/FastLink/scripts/shorten.php', {long_url: $('#long_val').val()}, function(data){
				//Hide the AJAX loader 
				$('.loader:eq(0)').hide(500, function(){
					//Show the response
					$('.response:eq(0)').addClass('response_bg').html(data).fadeIn(1000);
				});
			});
		});
	return false;
});
});
</script>
<script type="text/javascript">
touchMove = function(event) {
// Prevent scrolling on this element
event.preventDefault();
}
</script>
<link href="css/main.css" rel="stylesheet" type="text/css">
</head>
<body ontouchmove="touchMove(event);" onload="onBodyLoad()">
<h1 class="center">FastLink</h1>
<div id='wrap'>
	<!--Bitly shorten-->
	<div class='box'>
		<form action='http://mobileap.ps/apps/FastLink/scripts/shorten.php' method='post'>
			<p>
				URL to shorten:
			</p>
			<p>
				<input id='long_val' type='text' name='long_url' class='field' value='http://'/>
				<span id='submit_short' type='submit' name='shorten_submit' class='button blue'>Shorten</span>
			</p>
			<div class='loader'>
			</div>
			<p class='response'>
			</p>
		</form>
	</div>
</div>


<div id='footer'>
<span class='button black' onclick="showAlert(); return false;">About</span>
</div>



</body>
</html>